<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="../modelo/template.xhtml">
	<ui:define name="conteudo">
		<div class="center_content">
			<h:form id="form">
				<p:messages showDetail="false" showSummary="true" autoUpdate="true" />
				<p:panel styleClass="  " header="#{msg.usuario}">

					<h:panelGrid columns="2" id="match" columnClasses="label, value"
						styleClass="formulario">
						
						<p:column styleClass="alignRight">
							<h:outputLabel for="senhaAtual" value="#{msg.senhaAtual}: *" />
						</p:column>
						<p:column styleClass="grid-427">
							<p:password id="senhaAtual"
								styleClass="alignLeft margin-20r input-size-270"
								value="#{usuarioManagedBean.senhaAtual}" required="true"
								label="#{msg.senhaAtual}" requiredMessage="#{msg.msgSenhaAtualEmpty}."
								redisplay="true" maxlength="15"
								validatorMessage="#{msg.msgSenhaAtual}"
								feedback="false">
							</p:password>
						</p:column>
						
						
						
						<p:column styleClass="alignRight">
							<h:outputLabel for="senha" value="#{msg.nova} #{msg.senha}: *" />
						</p:column>
						<p:column styleClass="grid-427">
							<p:password id="senha"
								styleClass="alignLeft margin-20r input-size-270"
								value="#{usuarioManagedBean.confirmaSenha}" required="true"
								label="#{msg.nova} #{msg.senha}" match="confirmaSenha" requiredMessage="#{msg.nova} #{msg.msgSenha}."
								redisplay="true" maxlength="15"
								validatorMessage="#{msg.msgSenhasIguais}"
								feedback="true">
							</p:password>
						</p:column>
						
						<p:column styleClass="alignRight">
							<h:outputLabel for="confirmaSenha" value="#{msg.resenha}: *" />
						</p:column>
						<p:column styleClass="grid-427">
							<p:password id="confirmaSenha"
								styleClass="alignLeft margin-20r input-size-270" 
								value="#{usuarioManagedBean.confirmaSenha}" required="true"
								label="#{msg.resenha}"
								requiredMessage="#{msg.msgResenha}" maxlength="15"
								feedback="true" />
						</p:column>

					</h:panelGrid>

					<p:commandButton id="save" value="#{msg.cadastrar}" ajax="false" update="match"
						action="#{usuarioManagedBean.alteraSenha}" />
				</p:panel>

			</h:form>

		</div>
		<!-- end of center content -->
	</ui:define>
</ui:composition>

</html>